﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<TemplateWeb.Models.ViewModels.GroupViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

<% var lstDanhMucCon = Model.DanhMucConModel.GetModel.LstObjModel; %>

<div id="bc">
	<div class="ja-breadcrums">
		<strong>You are here:</strong> <span class="breadcrumbs pathway">Xem các phiên</span>
	</div>
</div>
<div id="ja-mainbody" style="width:80%">
    <div id="ja-main" style="width:100%">
        <div id="ja-contentwrap" class="">
			<div id="ja-content" class="column" style="width:100%">
                <div id="ja-current-content" class="column" style="width:100%">
					<div id="content"></div>
                    <div class="ja-content-main clearfix">
                        <div style="margin:10px">
		                    <div style="border:2px solid #000;">
		                        <strong><%= Model.SelectedDanhMucChinhModel.GetModel.LstObjModel[0].TenDanhMucChinh%></strong>
		                        <div>
                                <%
                                    var numPhien = 0;
                                    foreach (var danhmuccon in lstDanhMucCon)
                                    {
                                        numPhien += danhmuccon.PhienDauGia.Where(n => n.ThoiGianBatDau <= DateTime.Now && DateTime.Now <= n.ThoiGianKetThuc).Count();
                                    }
                                %>
		                            <span style="font-size:12px;">
		                            Thư mục chính: <%= lstDanhMucCon.Count %> - Số Phiên hiện có: <%= numPhien %>
			                            <a href="<%= Url.Action("XemCacPhienTheoHangMuc", "Home", new { iddanhmucchinh = Model.SelectedDanhMucChinhModel.GetModel.LstObjModel[0].ID })%>" title="Xem danh sách">
				                            <img src="../../Content/Images/Home/category.gif" border="0" alt="Xem danh sách" />
			                            </a>
		                            </span>
		                        </div>
	                        </div>
	                    </div>
                        <table id="auction_categories" cellspacing="0" cellpadding="0">
                            <tbody>
                            <% 
                            for (int i = 0; i < lstDanhMucCon.Count; i++)
                            { 
                        %>
                            <% if (i % 2 == 0)
                                { %>
                                <tr>
                             <% } %>
	                                <td width="50%" class="auction_catcell" valign="top">
		                                <div class="auction_maincat">
			                                <a href="<%= Url.Action("XemCacPhienTheoHangMuc", "Home", new { iddanhmucchinh = Model.SelectedDanhMucChinhModel.GetModel.LstObjModel[0].ID, iddanhmuccon = lstDanhMucCon[i].ID })%>" title="Xem danh sách">
                                                <strong><%= lstDanhMucCon[i].TenDanhMucCon %></strong>
                                            </a>
            			                    <a style="font-size:12px !important;" href="<%= Url.Action("XemCacPhienTheoHangMuc", "Home", new { iddanhmucchinh = Model.SelectedDanhMucChinhModel.GetModel.LstObjModel[0].ID, iddanhmuccon = lstDanhMucCon[i].ID })%>">
                                                <img src="../../Content/Images/Home/category.gif" width="10" border="0" alt="Xem danh sách" title="Xem danh sách"/>
                                            </a>
		                                </div>
		                                <div class="auction_subcat" style="background:#F5F5F5; border:1px solid #FFFFFF; ">
                		                    <span style="font-size:12px;">Số Phiên hiện có: <%= lstDanhMucCon[i].PhienDauGia.Where(n => n.ThoiGianBatDau <= DateTime.Now && DateTime.Now <= n.ThoiGianKetThuc).Count() %></span>
                		                    <br/>
        		        		        </div>
	                                </td>
                                <% if (i % 2 != 0)
                                { %>
                                </tr>
                             <% } %>
                        <% } %>
                            </tbody>
                        </table>
				    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</asp:Content>
